<!DOCTYPE HTML>
<html class="no-js">
<head>
    <meta charset="UTF-8">
    <title>GINI</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="../layui/css/layui.css">
    <style>
        body {
            background-repeat:no-repeat;
            background-attachment:fixed;
            background-position:50% 0
        } 
        .container{
            margin-top: 200px;
        }
        .container form{
            background: rgba(0, 0, 0, 0.7);
            max-width: 500px;
            margin: 0 auto;
            padding: 3em;
            border-radius: 10px;
            box-sizing: border-box;
        }

        .container label {
            display: block;
            text-transform: uppercase;
            font-size: 13px;
            color: #d2d2d2;
            letter-spacing: 2px;
            margin-bottom: 10px;
            font-style: italic;
        }
    </style>
</head>
<body class="layui-layout-body" >
</body>
<!-- 引用js -->
<script src="../layui/layui.js"></script>
<script src="../assets/ejs.js"></script>
<script src="../assets/bluebird.min.js"></script>
<script src="assets/emitter.js"></script>
<script src="assets/multi.js"></script>
<script src="assets/gsdk.js"></script>
<script>
    layui.config({'base': '../share/modules/'}).extend({ //设定模块别名
        'scene':'../../develop/assets/scene',
        'admin':'../../develop/assets/admin',
    }).use(['element','form','cosjs','scene','storage'], function () {
        let cosjs = layui.cosjs,scene = layui.scene ;
         let urlParse = cosjs.url.parse();
         let urlQuery = urlParse.query;
        // let sid = urlQuery['id']||'';
         let branch = urlQuery['branch']||'';
         let _curUser=layui.storage('curUser');
         _curUser.set('uid',urlQuery['uid']);
        let _role_list=layui.storage('userList').get(urlQuery['uid']);
        layui.branch = branch;
        const eindex=urlParse.href.indexOf('dev');
        let url=urlParse.href.substr(0,eindex-1);
        scene.root = String(urlParse.href).replace('index.html','');
        //加载初始化信息
        Promise.resolve().then(()=>{
            let rurl = url + '/apps/developNew';
            let query = {"branch":branch};
            //query[cookie.k] = cookie.v;
            return cosjs.post(rurl,query)
        }).then(ret=>{
            if(_role_list&&_role_list.length>0){
               // 快跳
                let _sdk_data = {};
                _sdk_data.remote = [url,'s'].join('/');
                console.log("妈的必然是这里有问题啊----------_sdk_data.remote:",_sdk_data.remote)
                _sdk_data.opensdk = ret['opensdk']||{};
                let _data={role:_role_list,sdk:_sdk_data}
                scene.show('gzone/quick',_data);

                // let data = {};
                // data.remote = [url,'s'].join('/');
                // data.opensdk = ret['opensdk']||{};
                // scene.show('gzone/login',data);
            }
            else{
                let data = {};
                data.remote = [url,'s'].join('/');
                console.log("妈的必然是这里有问题啊----------",data.remote )
                data.opensdk = ret['opensdk']||{};
                scene.show('gzone/login',data);
            }
        }).catch(err=>{
            cosjs.alert(err);
        })
    });
</script>
</html>